package inventory.daoImplementer;

import java.sql.SQLException;

import dbhandelling.Crude;
import inventory.model.IssueSlipItem;

import inventory.daoInterface.IssueSlipItemDao;


public class IssueSlipItemImplementor extends Crude implements IssueSlipItemDao
{
	
	@Override
	public void add(IssueSlipItem issueSlipItems) throws Exception 
	{
		insert(issueSlipItems);
	}

	@Override
	public void update(IssueSlipItem issueSlipItems) throws Exception 
	{
		
	}

	@Override
	public void delete(IssueSlipItem issueSlipItems) throws Exception 
	{
		
	}

	@Override
	public IssueSlipItem retreive(String conditionField, String ConditionValue) throws Exception 
	{
		IssueSlipItem issueSlipItems=(IssueSlipItem) super.retreive("IssueSlipItem",conditionField, ConditionValue);
		return issueSlipItems;
	}

	@Override
	public IssueSlipItem[] retreiveArray(String conditionField, String conditionValue) throws Exception 
	{
		IssueSlipItem[] issueSlipItemss;
		Object[] obj=super.retreiveArrayOnCondition("IssueSlipItem", conditionField, conditionValue);
		issueSlipItemss=new IssueSlipItem[obj.length];
		
		for(int i=0;i<issueSlipItemss.length;i++)
		{
			issueSlipItemss[i]=(IssueSlipItem) obj[i];
		}
		
		return issueSlipItemss;
	}

	@Override
	public IssueSlipItem[] retreiveAll() throws Exception 
	{
		IssueSlipItem[] issueSlipItemss;
		
		Object[] obj=super.retreiveAll("IssueSlipItem");
		
		issueSlipItemss=new IssueSlipItem[obj.length];
		
		for(int i=0;i<issueSlipItemss.length;i++)
		{
			issueSlipItemss[i]=(IssueSlipItem) obj[i];
		}
		
		return issueSlipItemss;
	}

}
